<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/7/28
  Time: 21:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.io.*,java.util.*" %>
<html>
<head>
    <title>check</title>
</head>
<body>
    <%
        request.setCharacterEncoding("utf-8");
        String name = request.getParameter("uname");
        String pwd = request.getParameter("upwd");
        if(name.equals("Yu") && pwd.equals("123456")){
            session.setAttribute("uname", name);
            request.getRequestDispatcher("welcome.jsp").forward(request,response);
        }else{
            response.sendRedirect("login.jsp");
        }
    %>
</body>
</html>
